def finonacco_sequence(n):
    a, b = 0, 1
    for _ in range(n):
        yield a
        a, b = b, a + b


for i in finonacco_sequence(10):
    print(i, end=" ")
print("")
"""
0 1 1 2 3 5 8 13 21 34
"""